package housing.task5.sax;

import org.xml.sax.SAXException;
import org.xml.sax.XMLReader;
import org.xml.sax.helpers.XMLReaderFactory;

import java.io.IOException;


public class TestApacheReader {
    public static void main(String[] args) {
        initSAXParser();
    }//void main()

    public static void initSAXParser() {
        try {
            XMLReader reader = XMLReaderFactory.createXMLReader();
            try {
                reader.parse("./src/main/resources/xml/RentersXML.xml");
            } catch (IOException e) {
                System.out.println("IO exception trying read .xml file!");
                e.printStackTrace();  //To change body of catch statement use File | Settings | File Templates.
            }
        } catch (SAXException saxe) {
            System.out.println("SAX parser exception!");
            saxe.printStackTrace();
        }
    }//void initSAXParser

}//class TestApacheReader
